//py le&lh
var commonJs = {
    // 时间格式化
    dateFormat: function(date) {
        var formetDate = new Date(date);
        return formetDate.getFullYear() + "-" + (formetDate.getMonth() + 1) + "-" + formetDate.getDate();
    },
    // 返回信息提示
    messageInfo: function(response) {
        if (response == null || response.data == null || response.data.success == undefined || response.data.msg == undefined) {
            return global.vm.$Message.warning('网络有问题请刷新重试!');
        }
        let type = response.data.success;
        let msg = response.data.msg;
        if (type) {
            return global.vm.$Message.success(msg);
        } else {
            return global.vm.$Message.error(msg);
        }
    },
    aaaa: function() {

    }
}
export default commonJs